home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / examples / doc / sigprc09 < prev    next >
Text File  |  1997-07-08  |  819b  |  25 lines

  1. ; This batch file creates a plot of the power spectrum of 
  2. ; the simulated signal used in the example from Chapter 13,
  3. ; "Signal Processing", of _Using IDL_, with a 30 cycle/second
  4. ; periodic component added.
  5.  
  6. N = 1024                      ; number of time samples in data set
  7.  
  8. delt = 0.02                   ; sampling interval in seconds
  9.  
  10. T = delt * FINDGEN(N)         ; vector of discrete times
  11.  
  12. f1 = 5.0 / ((n-1)*delt)
  13.  
  14. f2 = 0.5 / ((n-1)*delt)
  15.  
  16. R = SIN(2*!PI*f1*T) * SIN(2*!PI*f2*T)
  17.  
  18. PLOT_3DBOX, T, R, -FLOAT(HILBERT(R)), $
  19.     AX=40, AZ=15, XTICKS=5, XCHARSIZE=2, XTITLE = 'time in seconds', $
  20.     YTICKS=2, YCHARSIZE=2, YTITLE = 'real', YMARGIN=[4,8], $
  21.     ZTICKS=2, ZCHARSIZE=2, ZTITLE = 'imaginary'
  22.  
  23. XYOUTS, 0.5, 0.95, /NORMAL, ALIGNMENT=0.5, SIZE=1.5, $
  24.     'Analytic Signal for r(t) Using Hilbert Transform'
  25.